<div id="mainposts" class="notop">

<?php $i = 0; 
if (is_archive()) $post_number = get_option('glow_archivenum_posts');
if (is_search()) $post_number = get_option('glow_searchnum_posts');
if (is_tag()) $post_number = get_option('glow_tagnum_posts');
if (is_category()) $post_number = get_option('glow_catnum_posts');
global $query_string; query_posts($query_string . "&showposts=$post_number&paged=$paged"); 

if (have_posts()) : while (have_posts()) : the_post();
$i++;?>

<?php $thumb = get_post_meta($post->ID, 'Thumbnail', $single = true); ?>
<?php if (($thumb == '') && ($glow_grab_image == 'on')) $thumb = catch_that_image(); ?>
						
			<div class="mainpost-wrap<?php if (($i%2)<>0) echo (" first") ?>">
				<div class="bottom">
					<div class="inner-content">
						<?php if (get_option('glow_postinfo1_show') == 'on') include(TEMPLATEPATH . '/includes/postinfo-small.php'); ?>
						<h2><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><?php truncate_title(36); ?></a></h2>
						<a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $thumb; ?>&amp;h=65&amp;w=65&amp;zc=1" alt="<?php echo(the_title()); ?>" class="thumbnail" /></a>
						<p><?php truncate_post(79); ?></p>
					</div> <!-- end inner-content-->
				</div> <!-- end bottom-->
			</div> <!-- end mainpost-wrap-->
<?php endwhile; ?>
<div class="clear"></div>
	<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } 
	else { ?>
	<p class="pagination">
		<?php next_posts_link('&laquo; Previous Entries') ?>
		<?php previous_posts_link('Next Entries &raquo;') ?>
	</p>
	<?php } ?>
<?php else : ?>
	<?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
<?php endif; wp_reset_query(); ?>
</div> <!-- end mainposts -->